<extend name="_Layout/main"/>

<block name="breadcrumb">
    <div class="container">
        <ul class="breadcrumb">
            <li><i class="icon-location-arrow"></i></li>
            <li><a href="__ROOT__/">首页</a></li>
            <li><a href="{:U('')}">第三方登录</a></li>
        </ul>
    </div>
</block>

<block name="main">
    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-md-6 box">
                <div class="clearfix" style="margin-bottom: 20px;">
                    <a style="float:left;margin-right:10px;" href="#"><img src="{$user_sns_info.head}" width="50" height="50" /></a>
                    <div style="float:left;margin-right:10px;overflow: hidden;zoom: 1;">
                        <div>
                            <b>欢迎你，{$user_sns_info.nick}，您的{$user_sns_info.type}帐号授权成功</b>！<br>
                            <span>接下来完成简单的设置，即可用{$user_sns_info.type}帐号直接登录。</span>
                        </div>
                    </div>
                </div>
                <ul class="nav-tabs nav">
                    <li data-tab="reg1" class="active"><a href="#reg1" data-toggle="tab">注册新账号</a></li>
                    <li data-tab="reg2"><a href="#reg2" data-toggle="tab">绑定已有账号</a></li>
                </ul>
                <div class="tab-content">
                    <div id="reg1" class='tab-pane active'>
                        <form class="form reg-form" action="{:U('home/addon/execute',array('_addons'=>'SyncLogin','_controller'=>'Login','_action'=>'doregister'))}" method="post">
                            <div class="blank"></div>
                            <div class="form-group">
                                <label class="control-label">用户名</label>
                                <div class="controls">
                                    <input type="text" class="form-control" placeholder="请输入用户名" name="username" value="{$user_sns_info.nick}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">密 码</label>
                                <div class="controls">
                                    <input type="password" class="form-control" placeholder="请输入密码" name="password">
                                </div>
                            </div>
                            <div class="form-group">
                                <input type="hidden" name="reg_type" value="{$user_sns_info.type.strtolower}">
                                <input type="hidden" name="avatar" value="{$user_sns_info.head}">
                                <button type="submit" class="btn btn-success btn-block ajax-post" target-form="reg-form">注 册</button>
                            </div>
                        </form>
                    </div>
                    <div id="reg2" class='tab-pane'>
                        <form class="login-form" action="{:U('home/addon/execute',array('_addons'=>'SyncLogin','_controller'=>'Login','_action'=>'dobind'))}" method="post">
                            <div class="blank"></div>
                            <div class="form form-group">
                                <label class="control-label">账号</label>
                                <div class="controls">
                                    <input type="text" class="form-control" placeholder="请输入邮箱/手机号/用户名" name="username">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">密 码</label>
                                <div class="controls">
                                    <input type="password" class="form-control" placeholder="请输入密码" name="password">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="controls">
                                    <button type="submit" class="btn btn-success btn-block ajax-post" target-form="login-form">绑 定</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>
